package com.yoosora.common.mode;

import java.util.Date;

public abstract class BasicDTO extends ToString {
	private static final long serialVersionUID = -4919197886850986828L;
	protected Boolean deleted;
	protected String createdId;
	protected String createdBy;
	protected Date createdDate;
	protected Long createdDateTime;
	protected String lastModifiedId;
	protected String lastModifiedBy;
	protected Date lastModifiedDate;
	protected Long lastModifiedTime;
	protected String creProId;
	protected String modProId;
	protected Date batchDate;

	public void setCreatedDate(Date createdDate) {
		if (createdDate != null) {
			this.createdDate = createdDate;
			this.createdDateTime = createdDate.getTime() / 1000L;
		} else {
			this.createdDate = null;
			this.createdDateTime = null;
		}

	}

	public void setLastModifiedDate(Date lastModifiedDate) {
		if (lastModifiedDate != null) {
			this.lastModifiedDate = lastModifiedDate;
			this.lastModifiedTime = lastModifiedDate.getTime() / 1000L;
		} else {
			this.lastModifiedDate = null;
			this.lastModifiedTime = null;
		}

	}

	public BasicDTO() {
	}

	public Boolean getDeleted() {
		return this.deleted;
	}

	public String getCreatedId() {
		return this.createdId;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public Date getCreatedDate() {
		return this.createdDate;
	}

	public Long getCreatedDateTime() {
		return this.createdDateTime;
	}

	public String getLastModifiedId() {
		return this.lastModifiedId;
	}

	public String getLastModifiedBy() {
		return this.lastModifiedBy;
	}

	public Date getLastModifiedDate() {
		return this.lastModifiedDate;
	}

	public Long getLastModifiedTime() {
		return this.lastModifiedTime;
	}

	public String getCreProId() {
		return this.creProId;
	}

	public String getModProId() {
		return this.modProId;
	}

	public Date getBatchDate() {
		return this.batchDate;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}

	public void setCreatedId(String createdId) {
		this.createdId = createdId;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public void setCreatedDateTime(Long createdDateTime) {
		this.createdDateTime = createdDateTime;
	}

	public void setLastModifiedId(String lastModifiedId) {
		this.lastModifiedId = lastModifiedId;
	}

	public void setLastModifiedBy(String lastModifiedBy) {
		this.lastModifiedBy = lastModifiedBy;
	}

	public void setLastModifiedTime(Long lastModifiedTime) {
		this.lastModifiedTime = lastModifiedTime;
	}

	public void setCreProId(String creProId) {
		this.creProId = creProId;
	}

	public void setModProId(String modProId) {
		this.modProId = modProId;
	}

	public void setBatchDate(Date batchDate) {
		this.batchDate = batchDate;
	}

	@Override
	public String toString() {
		return "BasicDTO(deleted=" + this.getDeleted() + ", createdId=" + this.getCreatedId() + ", createdBy=" + this.getCreatedBy() + ", createdDate=" + this.getCreatedDate() + ", createdDateTime=" + this.getCreatedDateTime() + ", lastModifiedId=" + this.getLastModifiedId() + ", lastModifiedBy=" + this.getLastModifiedBy() + ", lastModifiedDate=" + this.getLastModifiedDate() + ", lastModifiedTime=" + this.getLastModifiedTime() + ", creProId=" + this.getCreProId() + ", modProId=" + this.getModProId() + ", batchDate=" + this.getBatchDate() + ")";
	}

	@Override
	public boolean equals(Object o) {
		if (o == this) {
			return true;
		} else if (!(o instanceof BasicDTO)) {
			return false;
		} else {
			BasicDTO other = (BasicDTO)o;
			if (!other.canEqual(this)) {
				return false;
			} else {
				label155: {
					Object this$deleted = this.getDeleted();
					Object other$deleted = other.getDeleted();
					if (this$deleted == null) {
						if (other$deleted == null) {
							break label155;
						}
					} else if (this$deleted.equals(other$deleted)) {
						break label155;
					}

					return false;
				}

				Object this$createdId = this.getCreatedId();
				Object other$createdId = other.getCreatedId();
				if (this$createdId == null) {
					if (other$createdId != null) {
						return false;
					}
				} else if (!this$createdId.equals(other$createdId)) {
					return false;
				}

				Object this$createdBy = this.getCreatedBy();
				Object other$createdBy = other.getCreatedBy();
				if (this$createdBy == null) {
					if (other$createdBy != null) {
						return false;
					}
				} else if (!this$createdBy.equals(other$createdBy)) {
					return false;
				}

				label134: {
					Object this$createdDate = this.getCreatedDate();
					Object other$createdDate = other.getCreatedDate();
					if (this$createdDate == null) {
						if (other$createdDate == null) {
							break label134;
						}
					} else if (this$createdDate.equals(other$createdDate)) {
						break label134;
					}

					return false;
				}

				label127: {
					Object this$createdDateTime = this.getCreatedDateTime();
					Object other$createdDateTime = other.getCreatedDateTime();
					if (this$createdDateTime == null) {
						if (other$createdDateTime == null) {
							break label127;
						}
					} else if (this$createdDateTime.equals(other$createdDateTime)) {
						break label127;
					}

					return false;
				}

				label120: {
					Object this$lastModifiedId = this.getLastModifiedId();
					Object other$lastModifiedId = other.getLastModifiedId();
					if (this$lastModifiedId == null) {
						if (other$lastModifiedId == null) {
							break label120;
						}
					} else if (this$lastModifiedId.equals(other$lastModifiedId)) {
						break label120;
					}

					return false;
				}

				Object this$lastModifiedBy = this.getLastModifiedBy();
				Object other$lastModifiedBy = other.getLastModifiedBy();
				if (this$lastModifiedBy == null) {
					if (other$lastModifiedBy != null) {
						return false;
					}
				} else if (!this$lastModifiedBy.equals(other$lastModifiedBy)) {
					return false;
				}

				label106: {
					Object this$lastModifiedDate = this.getLastModifiedDate();
					Object other$lastModifiedDate = other.getLastModifiedDate();
					if (this$lastModifiedDate == null) {
						if (other$lastModifiedDate == null) {
							break label106;
						}
					} else if (this$lastModifiedDate.equals(other$lastModifiedDate)) {
						break label106;
					}

					return false;
				}

				Object this$lastModifiedTime = this.getLastModifiedTime();
				Object other$lastModifiedTime = other.getLastModifiedTime();
				if (this$lastModifiedTime == null) {
					if (other$lastModifiedTime != null) {
						return false;
					}
				} else if (!this$lastModifiedTime.equals(other$lastModifiedTime)) {
					return false;
				}

				label92: {
					Object this$creProId = this.getCreProId();
					Object other$creProId = other.getCreProId();
					if (this$creProId == null) {
						if (other$creProId == null) {
							break label92;
						}
					} else if (this$creProId.equals(other$creProId)) {
						break label92;
					}

					return false;
				}

				Object this$modProId = this.getModProId();
				Object other$modProId = other.getModProId();
				if (this$modProId == null) {
					if (other$modProId != null) {
						return false;
					}
				} else if (!this$modProId.equals(other$modProId)) {
					return false;
				}

				Object this$batchDate = this.getBatchDate();
				Object other$batchDate = other.getBatchDate();
				if (this$batchDate == null) {
					if (other$batchDate != null) {
						return false;
					}
				} else if (!this$batchDate.equals(other$batchDate)) {
					return false;
				}

				return true;
			}
		}
	}

	protected boolean canEqual(Object other) {
		return other instanceof BasicDTO;
	}

	@Override
	public int hashCode() {
		int result = 1;
		Object $deleted = this.getDeleted();
		result = result * 59 + ($deleted == null ? 43 : $deleted.hashCode());
		Object $createdId = this.getCreatedId();
		result = result * 59 + ($createdId == null ? 43 : $createdId.hashCode());
		Object $createdBy = this.getCreatedBy();
		result = result * 59 + ($createdBy == null ? 43 : $createdBy.hashCode());
		Object $createdDate = this.getCreatedDate();
		result = result * 59 + ($createdDate == null ? 43 : $createdDate.hashCode());
		Object $createdDateTime = this.getCreatedDateTime();
		result = result * 59 + ($createdDateTime == null ? 43 : $createdDateTime.hashCode());
		Object $lastModifiedId = this.getLastModifiedId();
		result = result * 59 + ($lastModifiedId == null ? 43 : $lastModifiedId.hashCode());
		Object $lastModifiedBy = this.getLastModifiedBy();
		result = result * 59 + ($lastModifiedBy == null ? 43 : $lastModifiedBy.hashCode());
		Object $lastModifiedDate = this.getLastModifiedDate();
		result = result * 59 + ($lastModifiedDate == null ? 43 : $lastModifiedDate.hashCode());
		Object $lastModifiedTime = this.getLastModifiedTime();
		result = result * 59 + ($lastModifiedTime == null ? 43 : $lastModifiedTime.hashCode());
		Object $creProId = this.getCreProId();
		result = result * 59 + ($creProId == null ? 43 : $creProId.hashCode());
		Object $modProId = this.getModProId();
		result = result * 59 + ($modProId == null ? 43 : $modProId.hashCode());
		Object $batchDate = this.getBatchDate();
		result = result * 59 + ($batchDate == null ? 43 : $batchDate.hashCode());
		return result;
	}
}
